<template>
	<PullRefresh ref="pullRefresh"
	             :on-refresh="onRefresh"
	             :on-load-more="onLoadMore">
		<ul>
			<li v-for="i in 100">{{i}}</li>
		</ul>
	</PullRefresh>
</template>

<script>
    import {onMounted, onUnmounted, ref} from "vue";
    import PullRefresh from "/src/components/common/pull-refresh";
    import Http from "/src/utils/js/http";
    export default {
        name: "Follow",
        components: {PullRefresh},
        setup() {
            onMounted(() => {
                console.log('onMounted----->Follow')
            })
	        onUnmounted(() => {
                console.log('onUnmounted----->Follow')
            })
            const pullRefresh = ref()
            const onRefresh = () => {
                console.log('mescroll----->down')
                Http.getMainHomeLive(1, (code,msg,info) => {
                    console.log(code,msg,info)
                })
                // setTimeout(() => {
                //     pullRefresh.value.refreshSuccess()
                // }, 2000)
            }
            const onLoadMore= () => {
            }
            return {
                pullRefresh,
                onRefresh,
                onLoadMore
            }
	        
        }
    }
</script>

<style scoped>
	li {
		height: 50px;
		width: 100%;
		color: #333;
		border-bottom: 1px solid #eee;
	}
</style>
